CXXFLAGS =	-O3 -g -Wall -fmessage-length=0
#CXXFLAGS = -g -Wall -fmessage-length=0
CXX = g++ $(CXXFLAGS)

OBJS =	lu.o matrix.o gram_schmidt.o simplecenterdiff.o problem.o givens.o

LIBS =

givens.o:
	$(CXX) -c givens.c $(LIBS)
lu.o:
	$(CXX) -c lu.c $(LIBS)
gram_schmidt.o:
	$(CXX) -c gram_schmidt.c $(LIBS)
matrix.o:
	$(CXX) -c matrix.c $(LIBS)
simplecenterdiff.o:
	$(CXX) -c simplecenterdiff.c $(LIBS)
problem.o:
	$(CXX) -c problem.c $(LIBS)

maings.o:
	$(CXX) -c maings.c
maings: maings.o $(OBJS)
	$(CXX) -o maings maings.o $(OBJS) $(LIBS)

mainlu.o:
	$(CXX) -c mainlu.c
mainlu: mainlu.o $(OBJS)
	$(CXX) -o mainlu mainlu.o $(OBJS) $(LIBS)

mainao.o:
	$(CXX) -c mainao.c
mainao: mainao.o $(OBJS)
	$(CXX) -o mainao mainao.o $(OBJS) $(LIBS)

all:	clean mainao

clean:
	rm -f *.o mainao
